﻿<%@ Page Title="" Language="C#" MasterPageFile="~/dormitoryAdministrator/dormitoryAdministrator.Master" AutoEventWireup="true" CodeBehind="RepairReport.aspx.cs" Inherits="WebApplication1.dormitoryAdministrator.RepairReport" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="position:relative;top:5px;left:10px">
    <asp:Label ID="susername" runat="server" Text="姓名："></asp:Label>
    <asp:TextBox ID="selectName" runat="server" Width="88px"></asp:TextBox>
    <asp:Button ID="select" runat="server" Text="查询" OnClick="select_Click"/>
      <asp:Button ID="processed" runat="server" Text="查询已处理" OnClick="processed_Click" />
      <asp:Button ID="unprocess" runat="server" Text="查询未处理" OnClick="unprocess_Click"  />
     <asp:Button ID="selectAll" runat="server" Text="查询全部" OnClick="selectAll_Click" />
     </div>
       <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" CellSpacing="10" DataKeyNames ="id"  Width="100%" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" AllowPaging="True" PageSize="10">
           <AlternatingRowStyle BackColor="White" />
           <Columns>
               <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="id" Visible="false"/>
                <asp:TemplateField HeaderText ="序号" InsertVisible="False">
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                     <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# this.GridView1.PageIndex * this.GridView1.PageSize + this.GridView1.Rows.Count + 1%>'/>
                    </ItemTemplate>
                </asp:TemplateField>
               <asp:BoundField DataField="name" HeaderText="申请人" SortExpression="name" />
               <asp:BoundField DataField="address" HeaderText="地址" SortExpression="adress" />
               <asp:BoundField DataField="message" HeaderText="维修内容" SortExpression="message" />
               <asp:BoundField DataField="phone" HeaderText="联系方式" SortExpression="phone" />
               <asp:BoundField DataField="reporttime" HeaderText="申请时间" SortExpression="reporttime" />
               <asp:BoundField DataField="state" HeaderText="状态" SortExpression="state"  />
               <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:Button ID="process" runat="server" Text="处理" OnClick="process_Click"/>
                    </ItemTemplate>
                </asp:TemplateField>
           </Columns>
           <EditRowStyle BackColor="#2461BF" />
           <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
           <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
           <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
           <RowStyle BackColor="#EFF3FB" />
           <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
           <SortedAscendingCellStyle BackColor="#F5F7FB" />
           <SortedAscendingHeaderStyle BackColor="#6D95E1" />
           <SortedDescendingCellStyle BackColor="#E9EBEF" />
           <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dmsConnectionString %>" ProviderName="<%$ ConnectionStrings:dmsConnectionString.ProviderName %>" SelectCommand="SELECT * FROM `dormitory_maintenance`"></asp:SqlDataSource>
</asp:Content>
